package com.jdbc.student;

import java.util.Scanner;

/**
 * 测试类 v2.0 使用PreparedStatement执行预处理SQL语句
 * 
 * @author Enginner-Jie
 */
public class Test_2 {
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		System.out.println("插入记录--1,查询记录--2,删除记录--3");
		// 插入记录

		System.out.println("-------插入记录--------");
		System.out.println("请输入考生信息：");
		System.out.println("4 Or 6 ?");
		int type = sc.nextInt();

		System.out.println("IDCard:");
		String iDCard = sc.next();

		System.out.println("ExamCard:");
		String examCard = sc.next();

		System.out.println("StudentName:");
		String studentName = sc.next();

		System.out.println("Location:");
		String location = sc.next();

		System.out.println("Grade:");
		int grade = sc.nextInt();


		Function.insert(type, iDCard, examCard, studentName, location, grade);
		System.out.println("添加记录成功!");
		
	}
}
